CREATE OR REPLACE PROCEDURE is_templob_open(
  p_lob IN OUT BLOB, p_retval OUT INTEGER) IS
BEGIN
  -- create a temporary LOB
  DBMS_LOB.CREATETEMPORARY (p_lob, TRUE);
  -- see if the LOB is open: returns 1 if open
  p_retval := DBMS_LOB.ISOPEN (p_lob);
  DBMS_OUTPUT.PUT_LINE (
    'The file returned a value...' || p_retval);
  -- free the temporary LOB
  DBMS_LOB.FREETEMPORARY (p_lob);
END;
/

set serveroutput on
DECLARE
  v_lob BLOB;
  v_return INTEGER;
BEGIN
  is_templob_open(v_lob, v_return);
END;
/
